/*
 *
10	20	30	40	50	60	70	70	80	80	90	90	100	
10	20	30	40	50	60	70	70	80	80	90	90	100
 */

#include <iostream>
#include <algorithm>
#include <list>
#include <vector>
using namespace std;
int main(void){

	int a1[] ={10,20,30,40,50,60,70,80,90};
	int a2[]= {70,80,90, 100};
	int a3[13] = {0};
	merge(a1, a1+9, a2, a2+4, a3);
	for(int i=0; i<13; i++){
		cout << a3[i] << "\t" ;
	}
	cout << endl;
	
	list<int> L1;
	list<int> L2;
	for(int i=0; i<9; i++){
		L1.push_back(a1[i]);
	}
	for(int i=0; i<4; i++){
		L2.push_back(a2[i]);
	}
	L1.merge(L2);
	list<int>::iterator it;
	for(it=L1.begin(); it!=L1.end(); it++){
		cout << *it << "\t";
	}
	cout << endl;
	return 0;
}
